using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Text;
using virtuaPol.Model;
using virtuaPol.Util;
using virtuaPol.Main;

namespace virtuaPol.vpTest
{
    class TestCompressWorldFile : ITestCase
    {
        private int numIterations;
        private CWorld world;
        private string report = "";

        public TestCompressWorldFile(int iterations)
        {
            numIterations = iterations;
        }

        public void initialize()
        {
            TestSerializeWorld testWorld = new TestSerializeWorld(numIterations);
            testWorld.initialize();
            world = testWorld.World;
        }

        public bool execute()
        {
            report += "Create compressed worldfile\n";
            return WorldLoader.save(ref world, "test.vpw");
        }

        public void cleanup()
        { }

        public string getReport()
        {
            return report;
        }
    }
}
